package ro.myApp.articles.client;

import java.util.List;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.intercept.BypassInterceptors;

import ro.myApp.articles.dto.PublicationFindAllMessage;
import ro.myApp.articles.entities.Article;
import ro.myApp.articles.entities.Publication;
import ro.myApp.client.BaseView;

@Name("articles")
@BypassInterceptors
@Scope(ScopeType.PAGE)
public class Articles extends BaseView {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4281910786582540210L;

	private List<Article> documents;


	public List<Article> getDocuments() {
		if (null==documents)
			PublicationFindAllMessage msg = new PublicationFindAllMessage();
		msg.setForRole(forRole)
			documents = sendMessage(msg);
		return documents;
	}
	
	public void setDocuments(List<Article> documents) {
		this.documents = documents;
	}
}
